package com.fuqiang.nightshopadmin.controller;


import com.fuqiang.nightshopadmin.service.IUmsResourceCategoryService;
import com.fuqiang.nightshopcommon.api.R;
import com.fuqiang.nightshopumsmodel.entity.UmsResourceCategory;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 资源分类表 前端控制器
 * </p>
 *
 * @author fuqiang
 * @since 2020-04-14
 */
@RestController
@RequestMapping("/resourceCategory")
@AllArgsConstructor
public class UmsResourceCategoryController {

    private IUmsResourceCategoryService resourceCategoryService;

    @ApiOperation("查询所有后台资源分类")
    @RequestMapping(value = "/listAll", method = RequestMethod.GET)
    @ResponseBody
    public R<List<UmsResourceCategory>> listAll() {
        List<UmsResourceCategory> resourceList = resourceCategoryService.listAll();
        return R.success(resourceList);
    }

}

